package zqy;

import java.util.Arrays;
import java.util.Scanner;

class Rectangle{
	private int length;
	private int width;
	
	public Rectangle(int length, int width) {
		this.length = length;
		this.width = width;
	}
	public String toString() {
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}	
	public int getPerimeter(){
		return (2*(this.length+this.width));
	}
	public int getArea(){
		return (this.length*this.width);
	}
}
class Circle{
	private int radius;

	public Circle(int radius) {
		this.radius = radius;
	}
	public String toString() {
		return "Circle [radius=" + radius + "]";
	}
	public int getPerimeter(){
		return (int)(2*Math.PI*this.radius);
	}
	public int getArea(){
		return (int)(Math.PI*this.radius*this.radius);
	}
}
public class Main1 {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		Rectangle[] rectangles=new Rectangle[2];
		Circle[] circles=new Circle[2];
		int a=0,p=0;
		for(int i=0;i<2;i++){
			rectangles[i]=new Rectangle(sc.nextInt(),sc.nextInt());
		}
		for (int i=0;i<2;i++){
			circles[i]=new Circle(sc.nextInt());
		}
		for(int i=0;i<2;i++){
			p=rectangles[i].getPerimeter()+circles[i].getPerimeter()+p;
			a=rectangles[i].getArea()+circles[i].getArea()+a;
		}
		System.out.println(p);
		System.out.println(a);
		System.out.println(Arrays.deepToString(rectangles));
		System.out.println(Arrays.deepToString(circles));
		sc.close();
	}
}
